//
//  LonsInfoCell.m
//  JinFuThree
//
//  Created by 毛韶谦 on 2018/9/10.
//  Copyright © 2018年 毛韶谦. All rights reserved.
//

#import "LonsInfoCell.h"

@interface LonsInfoCell ()

@property (nonatomic, strong) UILabel *leftLabel;
@property (nonatomic, strong) UILabel *rightLabel;

@end

@implementation LonsInfoCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        [self.leftLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.bottom.top.mas_equalTo(self.contentView);
            make.left.mas_equalTo(self.contentView.mas_left).offset(20);
            make.height.mas_equalTo(30);
        }];
        [self.rightLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.bottom.top.mas_equalTo(self.contentView);
            make.right.mas_equalTo(self.contentView.mas_right).offset(-20);
        }];
    }
    return self;
}


- (void)updateInfoCellWithModel {
    
    self.leftLabel.text = @"商品名称";
    self.rightLabel.text = @"苹果iPhone8 64G 黑色";
}


- (UILabel *)leftLabel {
    
    if (!_leftLabel) {
        _leftLabel = [[UILabel alloc] init];
        _leftLabel.textColor = HexColor(0x999999);
        _leftLabel.font = [UIFont systemFontOfSize:14];
        
        [self.contentView addSubview:_leftLabel];
    }
    return _leftLabel;
}
- (UILabel *)rightLabel {
    
    if (!_rightLabel) {
        _rightLabel = [[UILabel alloc] init];
        _rightLabel.textColor = HexColor(0x333333);
        _rightLabel.font = [UIFont systemFontOfSize:14];
        
        [self.contentView addSubview:_rightLabel];
    }
    return _rightLabel;
}



- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
